package me.send.data.service.mapper;

import java.util.List;
import java.util.Map;

import me.send.data.service.pojo.UserRechargeList;
import me.send.data.service.provider.UserRechargeListProvider;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;


public abstract interface UserRechargeListMapper {
    
    @SelectProvider(method = "list", type = UserRechargeListProvider.class)	
    public abstract List<UserRechargeList> list(Map<String,Object> param);
    @SelectProvider(method = "count", type = UserRechargeListProvider.class)	
    public abstract Integer count(Map<String,Object> param);
    @Delete("delete from user_recharge_list where listId=#{listId}")
    public abstract void deteleBylistId(int listId);
    @Select("select * from user_recharge_list where listId=#{listId}")
    public abstract UserRechargeList queryBylistId(int listId);
    @Update("update user_recharge_list set listCode=#{listCode},"
    		+ "listDesc=#{listDesc},amount=#{amount},giveAmount=#{giveAmount}, "
    		+ "status=#{status},activeTimeBegin=#{activeTimeBegin},activeTimeEnd=#{activeTimeEnd} "
    		+ "where listId=#{listId} ")
    public abstract void update(UserRechargeList recharge);
    @Insert("insert into user_recharge_list(listCode,listDesc,amount,giveAmount,status,activeTimeBegin,activeTimeEnd,createTime,createUser) "
    		+ "values(#{listCode},#{listDesc},#{amount},#{giveAmount},#{status},#{activeTimeBegin},#{activeTimeEnd},#{createTime},#{createUser})")
    public abstract void insert(UserRechargeList recharge);
} 
